<?php session_start();
/**
* @package		Parents@School.
* @copyright	Copyright (C) 2008 Kristof Beckers. All rights reserved.
* @Version		0.1
* @license		GNU/GPL, see LICENSE.php
**/
?>

<head>
<link rel="stylesheet" href="../../css/template_css.css" type="text/css"/> 
</head>
<?php 
include ("../../include/config.php");
require_once ("../../include/db.php");
include ("../../include/header.php");

if(isset($_SESSION['myusername'])){
	if ($_SESSION['admin'] == "$adminid") {

$status = $_GET['stat'];
	
$username = $_POST['staffusername'];
$passwd = $_POST['staffpassword'];
$admin = $_POST['staffadmin'];
$md5password = md5($passwd);

//if ($status == "insert"){
$query = "INSERT INTO $tbstaff ( username , password , admin )

VALUES ( '$username' , '$md5password' , '$admin' )";

echo "<p class='bodytext'>$navigatieadmin <br><br>
		Alles is toegevoegd aan de database.<br><br>
		<a href='staff.php'>Ga verder</a></p>";

mysql_query($query) or die(mysql_error());


mysql_close($conn);
}}
else {
header("location:../index.php");
}
?>

